Skip to content

Commit

Permalink
pradosoft#872 TWeakCallableCollectionTest removes deprecated callables
Browse files Browse the repository at this point in the history
  • Loading branch information
belisoful committed Apr 17, 2023
1 parent 96f270f commit 3b20dfa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/unit/Collections/TWeakCallableCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public function testToPriorityArrayWeakTWeakCallableCollection()
//Test for that only callables can be inserted into the collection
$item1 = $list[] = 'foo';
$item2 = $list[] = ['CallableListItem', 'staticHandler'];
$item2 = $list[] = 'CallableListItem::staticHandler';
$item3 = $list[] = [$this->item1, 'eventHandler'];
$item4 = $list[] = 'CallableListItem::staticHandler';
$item5 = $list[] = ['CallableListItemChild','parent::staticHandler'];
$item6 = $list[] = $this->item2;

// Check that callables that have proper syntax but do not exist
Expand All @@ -93,10 +93,6 @@ public function testToPriorityArrayWeakTWeakCallableCollection()
$list[] = 'CallableListItem::noStaticMethod';
$this->fail('TInvalidDataValueException string of \'object::nostaticmethod\' that is not a method did not throw error');
} catch(TInvalidDataValueException $e){}
try {
$list[] = ['CallableListItemChild','parent::noMethod'];
$this->fail('TInvalidDataValueException string of [valid static object, \'parent::nostaticmethod\'] that is not a method did not throw error');
} catch(TInvalidDataValueException $e){}
try {
$list[] = $component;
$this->fail('TInvalidDataValueException object without __invocke did not throw error');
Expand Down

0 comments on commit 3b20dfa

Please sign in to comment.