Skip to content

Commit 337f8ae

Browse files
Skip insert many test on PHP 5.3
1 parent b008376 commit 337f8ae

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Table/Plugins/DeleteConstrainer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public function accepts( Table $table ) {
3232

3333
/**
3434
* @inheritDoc
35+
* @throws \InvalidArgumentException
36+
* @throws \UnexpectedValueException
3537
*/
3638
public function registered( Table $table ) {
3739

@@ -81,6 +83,7 @@ public function registered( Table $table ) {
8183
switch ( $behavior ) {
8284
case DeleteConstrained::RESTRICT:
8385
if ( $results ) {
86+
/** @noinspection ExceptionsAnnotatingAndHandlingInspection */
8487
throw new DeleteRestrictedException(
8588
get_class( $results->first() ) . " with primary key '$pk' cannot be deleted due to a constraint " .
8689
"on the {$table->get_slug()} table for column {$column_name}."

tests/unit/query/test-simple-query.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,10 @@ public function test_delete_many() {
405405
*/
406406
public function test_insert_many( $expected, $data ) {
407407

408+
if ( version_compare( PHP_VERSION, '5.3', '<=' ) ) {
409+
$this->markTestSkipped( 'Proxy target not working with 5.3' );
410+
}
411+
408412
$table = $this->getMockBuilder( 'IronBound\DB\Table\Table' )->setMethods( array(
409413
'get_columns',
410414
'get_column_defaults',

0 commit comments

Comments
 (0)