Skip to content

Commit 06763a6

Browse files
committed
fix Unittests
1 parent 13b6124 commit 06763a6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"require": {
1919
"php": "~7.0",
20-
"phpunit/phpunit-mock-objects": "~4.0|~5.0|~6.0"
20+
"phpunit/phpunit-mock-objects": "~5.0|~6.0"
2121
},
2222
"require-dev": {
2323
"phpunit/phpunit": "~6.4|~7.0"

src/EasyMock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function easyMock($classname, array $methods = array())
3434
}
3535

3636
foreach ($methods as $method => $return) {
37-
$this->mockMethod($mock, $method, new AnyInvokedCount, $return);
37+
$this->mockMethod($mock, $method, new AnyInvokedCount(), $return);
3838
}
3939

4040
return $mock;

tests/EasyMockTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function should_mock_objects()
3535
public function should_skip_the_constructor()
3636
{
3737
/** @var ClassWithConstructor $mock */
38-
$mock = $this->easyMock('EasyMock\Test\Fixture\ClassWithConstructor');
38+
$mock = $this->easyMock('\EasyMock\Test\Fixture\ClassWithConstructor');
3939
$this->assertFalse($mock->constructorCalled);
4040
}
4141

@@ -128,7 +128,7 @@ public function should_allow_to_spy_method_calls()
128128
));
129129

130130
// Test PHPUnit's internals to check that the spy was registered
131-
$property = new \ReflectionProperty('PHPUnit\Framework\TestCase', 'mockObjects');
131+
$property = new \ReflectionProperty('\PHPUnit\Framework\TestCase', 'mockObjects');
132132
$property->setAccessible(true);
133133
$mockObjects = $property->getValue($this);
134134

0 commit comments

Comments
 (0)