Unverified Commit b6bf07b8 authored by alexpott's avatar alexpott
Browse files

Issue #2910775 by Sivaji, Hardik_Patel_12, hchonov, Mile23: Add test case for...

Issue #2910775 by Sivaji, Hardik_Patel_12, hchonov, Mile23: Add test case for EntityType::getHandlerClass returning NULL
parent 02d5e653
...@@ -465,6 +465,7 @@ public function getHandlerClass($handler_type, $nested = FALSE) { ...@@ -465,6 +465,7 @@ public function getHandlerClass($handler_type, $nested = FALSE) {
$handlers = $this->getHandlerClasses(); $handlers = $this->getHandlerClasses();
return $nested ? $handlers[$handler_type][$nested] : $handlers[$handler_type]; return $nested ? $handlers[$handler_type][$nested] : $handlers[$handler_type];
} }
return NULL;
} }
/** /**
......
...@@ -167,6 +167,8 @@ public function testGetHandler() { ...@@ -167,6 +167,8 @@ public function testGetHandler() {
]); ]);
$this->assertSame($controller, $entity_type->getHandlerClass('storage')); $this->assertSame($controller, $entity_type->getHandlerClass('storage'));
$this->assertSame($controller, $entity_type->getHandlerClass('form', 'default')); $this->assertSame($controller, $entity_type->getHandlerClass('form', 'default'));
$this->assertNull($entity_type->getHandlerClass('foo'));
$this->assertNull($entity_type->getHandlerClass('foo', 'bar'));
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment