/**
  * @return void
  */
 public function test_function()
 {
     // prepare
     $this->setExpectedException('\\UnexpectedValueException', 'Not initialized');
     // invoke logic & test
     Base::getInstance();
 }
Beispiel #2
0
 /**
  * @return void
  */
 public function test_function()
 {
     // prepare
     $this->setExpectedException('\\DbMockLibrary\\Exceptions\\AlreadyInitializedException', 'DbMockLibrary\\Base has already been initialized');
     // invoke logic
     Base::init([]);
     Base::init([]);
 }
Beispiel #3
0
 /**
  * @return void
  */
 public function test_function()
 {
     // invoke logic
     Base::init();
     // prepare
     $reflection = new \ReflectionClass('\\DbMockLibrary\\Base');
     $staticProperties = $reflection->getStaticProperties();
     // test
     $this->assertInstanceOf('\\DbMockLibrary\\Base', $staticProperties['instance']);
 }