Skip to content

Commit

Permalink
test for ignoring error suppressed by @
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 18, 2018
1 parent 190df9d commit 7f34032
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/system/CodeIgniterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,19 @@ public function testTransfersCorrectHTTPVersion()
$this->assertEquals(2, $response->getProtocolVersion());
}

public function testIgnoringErrorSuppressedByAt()
{
$_SERVER['argv'] = [
'index.php',
'/',
];
$_SERVER['argc'] = 2;

ob_start();
@unlink('inexistent-file');
$this->codeigniter->useSafeOutput(true)->run();
$output = ob_get_clean();

$this->assertContains('<h1>Welcome to CodeIgniter</h1>', $output);
}
}

0 comments on commit 7f34032

Please sign in to comment.