This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
pmhou
I've setup a test case for my plugin, following the documentation. If I create two tests (as below), I get drastically different outcomes. The first succeeds, however if I repeat the same in a second test, the page can no longer be found.
function testSearchPage()
{
$this->call('get', '/search')->status(); // 200
}
function testSearchPageAgain()
{
$this->call('get', '/search')->status(); // 404
}
Below is the output returned from the second test
<!DOCTYPE html>\n
<html lang="en">\n
<head>\n
<meta charset="utf-8">\n
<title>Page not found</title>\n
<link href="http://blizzard.dev/modules/system/assets/css/styles.css" rel="stylesheet">\n
</head>\n
<body>\n
<div class="container">\n
<h1><i class="icon-chain-broken warning"></i> Page not found</h1>\n
<p class="lead">The requested page cannot be found.</p>\n
</div>\n
</body>\n
</html>
I feel like I am missing something extremely fundamental to the way October is setup with PHPUnit?
1-1 of 1