| 1 | <?php |
||
| 9 | class NetgenOpenGraphRuntimeLoaderTest extends TestCase |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var NetgenOpenGraphRuntimeLoader |
||
| 13 | */ |
||
| 14 | protected $loader; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \PHPUnit_Framework_MockObject_MockObject |
||
| 18 | */ |
||
| 19 | protected $runtime; |
||
| 20 | |||
| 21 | public function setUp() |
||
| 22 | { |
||
| 23 | $this->runtime = $this->createMock(NetgenOpenGraphRuntime::class); |
||
| 24 | $this->loader = new NetgenOpenGraphRuntimeLoader($this->runtime); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function testLoad() |
||
| 28 | { |
||
| 29 | $runtime = $this->loader->load(NetgenOpenGraphRuntime::class); |
||
| 30 | $this->assertSame($this->runtime, $runtime); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testLoadWithStdClass() |
||
| 34 | { |
||
| 35 | $this->assertNull($this->loader->load(\stdClass::class)); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |