@@ 448-463 (lines=16) @@ | ||
445 | $this->assertEquals($expected, $actual); |
|
446 | } |
|
447 | ||
448 | public function testCreateSingletonEmptyName() |
|
449 | { |
|
450 | $returnType = m::mock(TEntityTypeType::class); |
|
451 | $this->assertTrue($returnType instanceof TEntityTypeType, get_class($returnType)); |
|
452 | $foo = new MetadataManager(); |
|
453 | ||
454 | $expected = "Name must be a non-empty string"; |
|
455 | $actual = null; |
|
456 | ||
457 | try { |
|
458 | $foo->createSingleton(null, $returnType); |
|
459 | } catch (\InvalidArgumentException $e) { |
|
460 | $actual = $e->getMessage(); |
|
461 | } |
|
462 | $this->assertEquals($expected, $actual); |
|
463 | } |
|
464 | ||
465 | public function testCreateSingletonNonStringName() |
|
466 | { |
|
@@ 465-480 (lines=16) @@ | ||
462 | $this->assertEquals($expected, $actual); |
|
463 | } |
|
464 | ||
465 | public function testCreateSingletonNonStringName() |
|
466 | { |
|
467 | $returnType = m::mock(TEntityTypeType::class); |
|
468 | $this->assertTrue($returnType instanceof TEntityTypeType, get_class($returnType)); |
|
469 | $foo = new MetadataManager(); |
|
470 | ||
471 | $expected = "Name must be a non-empty string"; |
|
472 | $actual = null; |
|
473 | ||
474 | try { |
|
475 | $foo->createSingleton($returnType, $returnType); |
|
476 | } catch (\InvalidArgumentException $e) { |
|
477 | $actual = $e->getMessage(); |
|
478 | } |
|
479 | $this->assertEquals($expected, $actual); |
|
480 | } |
|
481 | ||
482 | public function testCreateSingletonSuccessful() |
|
483 | { |