Skip to content

Commit

Permalink
fix Unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
mimmi20 committed Jan 14, 2019
1 parent 13b6124 commit 06763a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"require": {
"php": "~7.0",
"phpunit/phpunit-mock-objects": "~4.0|~5.0|~6.0"
"phpunit/phpunit-mock-objects": "~5.0|~6.0"
},
"require-dev": {
"phpunit/phpunit": "~6.4|~7.0"
Expand Down
2 changes: 1 addition & 1 deletion src/EasyMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function easyMock($classname, array $methods = array())
}

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

return $mock;
Expand Down
4 changes: 2 additions & 2 deletions tests/EasyMockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function should_mock_objects()
public function should_skip_the_constructor()
{
/** @var ClassWithConstructor $mock */
$mock = $this->easyMock('EasyMock\Test\Fixture\ClassWithConstructor');
$mock = $this->easyMock('\EasyMock\Test\Fixture\ClassWithConstructor');
$this->assertFalse($mock->constructorCalled);
}

Expand Down Expand Up @@ -128,7 +128,7 @@ public function should_allow_to_spy_method_calls()
));

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

Expand Down

0 comments on commit 06763a6

Please sign in to comment.