SimpleErrorQueue::add PHP Method

add() public method

Adds an error to the front of the queue.
public add ( integer $severity, string $content, string $filename, integer $line )
$severity integer PHP error code.
$content string Text of error.
$filename string File error occoured in.
$line integer Line number of error.
    public function add($severity, $content, $filename, $line)
    {
        $content = str_replace('%', '%%', $content);
        $this->testLatestError($severity, $content, $filename, $line);
    }

Usage Example

コード例 #1
0
ファイル: errors_test.php プロジェクト: Clansuite/Clansuite
 public function testExpectationMatchCancelsIncomingError()
 {
     $test = new MockSimpleTestCase();
     $test->expectOnce('assert', array(new IdenticalExpectation(new AnythingExpectation()), 'B', 'a message'));
     $test->setReturnValue('assert', true);
     $test->expectNever('error');
     $queue = new SimpleErrorQueue();
     $queue->setTestCase($test);
     $queue->expectError(new AnythingExpectation(), 'a message');
     $queue->add(1024, 'B', 'b.php', 100);
 }
All Usage Examples Of SimpleErrorQueue::add