diff --git a/tests/Generator/PeclUuidRandomGeneratorTest.php b/tests/Generator/PeclUuidRandomGeneratorTest.php index 24fec2d..650a93c 100644 --- a/tests/Generator/PeclUuidRandomGeneratorTest.php +++ b/tests/Generator/PeclUuidRandomGeneratorTest.php @@ -26,8 +26,8 @@ class PeclUuidRandomGeneratorTest extends PeclUuidTestCase $generator = new PeclUuidRandomGenerator(); $generator->generate($this->length); - $create->verifyInvoked(UUID_TYPE_RANDOM); - $parse->verifyInvoked($this->uuidString); + $create->verifyInvoked([UUID_TYPE_RANDOM]); + $parse->verifyInvoked([$this->uuidString]); } /** diff --git a/tests/Generator/PeclUuidTimeGeneratorTest.php b/tests/Generator/PeclUuidTimeGeneratorTest.php index f497e47..a3ed54a 100644 --- a/tests/Generator/PeclUuidTimeGeneratorTest.php +++ b/tests/Generator/PeclUuidTimeGeneratorTest.php @@ -25,8 +25,8 @@ class PeclUuidTimeGeneratorTest extends PeclUuidTestCase $generator = new PeclUuidTimeGenerator; $generator->generate(); - $create->verifyInvoked(UUID_TYPE_TIME); - $parse->verifyInvoked($this->uuidString); + $create->verifyInvoked([UUID_TYPE_TIME]); + $parse->verifyInvoked([$this->uuidString]); } /** diff --git a/tests/Provider/Node/RandomNodeProviderTest.php b/tests/Provider/Node/RandomNodeProviderTest.php index 964c15f..8dec64c 100644 --- a/tests/Provider/Node/RandomNodeProviderTest.php +++ b/tests/Provider/Node/RandomNodeProviderTest.php @@ -25,7 +25,7 @@ class RandomNodeProviderTest extends TestCase $randomBytes = AspectMock::func('Ramsey\Uuid\Provider\Node', 'random_bytes', $bytes); $provider = new RandomNodeProvider(); $provider->getNode(); - $randomBytes->verifyInvoked(6); + $randomBytes->verifyInvoked([6]); } /** @@ -44,7 +44,7 @@ class RandomNodeProviderTest extends TestCase $provider = new RandomNodeProvider(); $this->assertSame($expectedNode, $provider->getNode()); - $hexDec->verifyInvoked($expectedBytesHex); + $hexDec->verifyInvoked([$expectedBytesHex]); } /** @@ -65,7 +65,7 @@ class RandomNodeProviderTest extends TestCase $provider = new RandomNodeProvider(); $this->assertSame($expectedNode, $provider->getNode()); - $hexDec->verifyInvoked($expectedBytesHex); + $hexDec->verifyInvoked([$expectedBytesHex]); } /** @@ -84,7 +84,7 @@ class RandomNodeProviderTest extends TestCase $provider = new RandomNodeProvider(); $this->assertSame($expectedNode, $provider->getNode()); - $hexDec->verifyInvoked($expectedBytesHex); + $hexDec->verifyInvoked([$expectedBytesHex]); } public function testGetNodeAlwaysSetsMulticastBit() diff --git a/tests/Provider/Node/SystemNodeProviderTest.php b/tests/Provider/Node/SystemNodeProviderTest.php index 20acad1..c738ef4 100644 --- a/tests/Provider/Node/SystemNodeProviderTest.php +++ b/tests/Provider/Node/SystemNodeProviderTest.php @@ -72,7 +72,7 @@ class SystemNodeProviderTest extends TestCase $node = $provider->getNode(); /*/ Assert the result match expectations /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); $this->assertSame($expected, $node); @@ -109,7 +109,7 @@ class SystemNodeProviderTest extends TestCase $node = $provider->getNode(); /*/ Assert /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); $this->assertFalse($node); } @@ -141,7 +141,7 @@ class SystemNodeProviderTest extends TestCase $node = $provider->getNode(); /*/ Assert /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); $this->assertEquals($expected, $node); } @@ -172,7 +172,7 @@ class SystemNodeProviderTest extends TestCase $node = $provider->getNode(); /*/ Assert /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); $this->assertEquals(false, $node); } @@ -199,7 +199,7 @@ class SystemNodeProviderTest extends TestCase $node = $provider->getNode(); /*/ Assert /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); $this->assertEquals('AABBCCDDEEFF', $node); } @@ -226,7 +226,7 @@ class SystemNodeProviderTest extends TestCase $node = $provider->getNode(); /*/ Assert /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); $this->assertFalse($node); } @@ -254,7 +254,7 @@ class SystemNodeProviderTest extends TestCase $provider->getNode(); /*/ Assert /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); } /** @@ -320,7 +320,7 @@ class SystemNodeProviderTest extends TestCase $node2 = $provider->getNode(); /*/ Assert /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); $this->assertEquals($node, $node2); } @@ -348,7 +348,7 @@ class SystemNodeProviderTest extends TestCase $node2 = $provider->getNode(); /*/ Assert /*/ - $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disabled_functions']); + $this->assertMockFunctions(null, null, ['netstat -ie 2>&1'], [['a'], ['s']], ['disable_functions']); $this->assertEquals($node, $node2); } @@ -434,7 +434,7 @@ class SystemNodeProviderTest extends TestCase ['/sys/class/net/*/address'], ['netstat -ie 2>&1'], [['a'], ['s']], - ['disabled_functions'] + ['disable_functions'] ); $this->assertEquals('010203040506', $node); @@ -467,7 +467,7 @@ class SystemNodeProviderTest extends TestCase ['/sys/class/net/*/address'], ['netstat -ie 2>&1'], [['a'], ['s']], - ['disabled_functions'] + ['disable_functions'] ); $this->assertEquals('010203040506', $node); @@ -498,7 +498,7 @@ class SystemNodeProviderTest extends TestCase null, null, [['s']], - ['disabled_functions'] + ['disable_functions'] ); $this->assertFalse($node); @@ -564,6 +564,9 @@ class SystemNodeProviderTest extends TestCase $this->functionProxies[$key]->verifyNeverInvoked(); } elseif (is_array($asserts)) { foreach ($asserts as $assert) { + if (!is_array($assert)) { + $assert = [$assert]; + } $this->functionProxies[$key]->verifyInvokedOnce($assert); } } elseif (is_callable($asserts)) {