Skip to content

Commit 77112ff

Browse files
committed
More tests
1 parent 73c7bbc commit 77112ff

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

tests/Fixture/InterfaceFixture.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace EasyMock\Test\Fixture;
4+
5+
interface InterfaceFixture
6+
{
7+
public function foo();
8+
}

tests/MockClassTest.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,23 @@ class MockClassTest extends \PHPUnit_Framework_TestCase
1313
/**
1414
* @test
1515
*/
16-
public function should_generate_mock_object()
16+
public function should_mock_objects()
1717
{
1818
$mock = EasyMock::mock('EasyMock\Test\Fixture\ClassFixture');
1919

2020
$this->assertInstanceOf('PHPUnit_Framework_MockObject_MockObject', $mock);
21+
$this->assertNull($mock->foo());
22+
}
23+
24+
/**
25+
* @test
26+
*/
27+
public function should_mock_interfaces()
28+
{
29+
$mock = EasyMock::mock('EasyMock\Test\Fixture\InterfaceFixture');
30+
31+
$this->assertInstanceOf('PHPUnit_Framework_MockObject_MockObject', $mock);
32+
$this->assertNull($mock->foo());
2133
}
2234

2335
/**

0 commit comments

Comments
 (0)