| @@ 10-16 (lines=7) @@ | ||
| 7 | ||
| 8 | class TSchemaTypeTest extends TestCase |
|
| 9 | { |
|
| 10 | public function testIsOKJammedOpen() |
|
| 11 | { |
|
| 12 | $foo = m::mock(TSchemaType::class)->makePartial()->shouldAllowMockingProtectedMethods(); |
|
| 13 | $foo->shouldReceive('getRand')->andReturn(2)->once(); |
|
| 14 | ||
| 15 | $this->assertTrue($foo->isOK()); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function testIsOKNotJammedOpen() |
|
| 19 | { |
|
| @@ 18-24 (lines=7) @@ | ||
| 15 | $this->assertTrue($foo->isOK()); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function testIsOKNotJammedOpen() |
|
| 19 | { |
|
| 20 | $foo = m::mock(TSchemaType::class)->makePartial()->shouldAllowMockingProtectedMethods(); |
|
| 21 | $foo->shouldReceive('getRand')->andReturn(0)->once(); |
|
| 22 | ||
| 23 | $this->assertFalse($foo->isOK()); |
|
| 24 | } |
|
| 25 | } |
|
| 26 | ||