From 2bf1a517f3edc1bd43b8e3340f0f6fd31b1ba94a Mon Sep 17 00:00:00 2001 From: David Date: Mon, 10 Aug 2015 06:42:01 +0200 Subject: fix unit tests --- tests/unit/PradoBaseTest.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tests/unit/PradoBaseTest.php (limited to 'tests/unit/PradoBaseTest.php') diff --git a/tests/unit/PradoBaseTest.php b/tests/unit/PradoBaseTest.php new file mode 100644 index 00000000..94abb25e --- /dev/null +++ b/tests/unit/PradoBaseTest.php @@ -0,0 +1,40 @@ +assertFalse(class_exists(self::CLASS_FQN, false)); + Prado::using(self::CLASS_FQN); + $this->assertTrue(class_exists(self::CLASS_FQN, false)); + } + + public function testUsingInterface() + { + $this->assertFalse(interface_exists(self::INTERFACE_SHORT_NAME, false)); + Prado::using(self::INTERFACE_FQN); + $this->assertTrue(interface_exists(self::INTERFACE_SHORT_NAME, false)); + } + + public function testCreateComponentWithNamespace() + { + $this->assertInstanceOf(self::CLASS_FQN, Prado::createComponent(self::CLASS_FQN)); + } + + public function testCreateComponentWithPradoNamespace() + { + $this->assertInstanceOf(self::CLASS_FQN, Prado::createComponent(self::CLASS_PRADO_FULLNAME)); + } + + +} -- cgit v1.2.3