@@ 396-411 (lines=16) @@ | ||
393 | $this->assertEquals($expected, $actual); |
|
394 | } |
|
395 | ||
396 | public function testCreateSingletonEmptyName() |
|
397 | { |
|
398 | $returnType = m::mock(TEntityTypeType::class); |
|
399 | $this->assertTrue($returnType instanceof TEntityTypeType, get_class($returnType)); |
|
400 | $foo = new MetadataManager(); |
|
401 | ||
402 | $expected = 'Name must be a non-empty string'; |
|
403 | $actual = null; |
|
404 | ||
405 | try { |
|
406 | $foo->createSingleton(null, $returnType, null); |
|
407 | } catch (\InvalidArgumentException $e) { |
|
408 | $actual = $e->getMessage(); |
|
409 | } |
|
410 | $this->assertEquals($expected, $actual); |
|
411 | } |
|
412 | ||
413 | public function testCreateSingletonNonStringName() |
|
414 | { |
|
@@ 413-428 (lines=16) @@ | ||
410 | $this->assertEquals($expected, $actual); |
|
411 | } |
|
412 | ||
413 | public function testCreateSingletonNonStringName() |
|
414 | { |
|
415 | $returnType = m::mock(TEntityTypeType::class); |
|
416 | $this->assertTrue($returnType instanceof TEntityTypeType, get_class($returnType)); |
|
417 | $foo = new MetadataManager(); |
|
418 | ||
419 | $expected = 'Name must be a non-empty string'; |
|
420 | $actual = null; |
|
421 | ||
422 | try { |
|
423 | $foo->createSingleton($returnType, $returnType, null); |
|
424 | } catch (\InvalidArgumentException $e) { |
|
425 | $actual = $e->getMessage(); |
|
426 | } |
|
427 | $this->assertEquals($expected, $actual); |
|
428 | } |
|
429 | ||
430 | public function testCreateSingletonSuccessful() |
|
431 | { |