Пример #1
0
 /**
  * Case - Basic panel test.
  */
 public function testBasic()
 {
     // Get the panel instance
     $panel = new ShieldPanel();
     // Assert returned values from the methods
     $this->assertSame('', $panel->getTab());
     // There is no Shield instance
     $this->assertSame('', $panel->getPanel());
     // Always empty
     $this->assertInternalType('string', $panel->getShieldIcon());
     // Create instance of the Shield class - disabled
     new Shield([], $panel, new Response());
     // Just check first few characters
     $this->assertStringStartsWith('<span title="Shield', $panel->getTab());
     // Create instance of the Shield class - enabled
     new Shield(['enabled' => true], $panel, new Response());
     // Just check first few characters
     $this->assertStringStartsWith('<span title="Shield', $panel->getTab());
 }