Пример #1
0
 /**
  * Gets the class file path
  *
  * @return  string
  * @author  Neil Brayfield
  **/
 public function filename()
 {
     if (!$this->class->getFilename()) {
         return false;
     } else {
         return Debug::path($this->class->getFilename());
     }
 }
Пример #2
0
 /**
  * Get a single line of text representing the exception:
  *
  *
  *
  * @param   Exception   Error exception to log
  * @return  string      In the format Error [ Code ]: Message ~ File [ Line ]
  */
 public static function text(\Exception $e)
 {
     return sprintf('%s [ %s ]: %s ~ %s [ %d ]', get_class($e), $e->getCode(), strip_tags($e->getMessage()), Debug::path($e->getFile()), $e->getLine());
 }
Пример #3
0
 /**
  * Tests Debug::path()
  *
  * @test
  * @dataProvider provider_debug_path
  * @covers Debug::path
  * @param boolean $path     Input for Debug::path
  * @param boolean $expected Output for Debug::path
  */
 public function test_debug_path($path, $expected)
 {
     $this->assertEquals($expected, Debug::path($path));
 }