Location: PHPKode > projects > GnomePHP > peec-GnomePHP-b5a360b/apps/myapp/controller/AppTests.php
<?php
namespace myapp\controller;

class AppTests extends \gnomephp\testsuite\TestApplication{
	
	private $hostUrl = 'http://localhost';
	
	
	protected function testWebsite(){
		
		// The main page!
		$this->browser($this->hostUrl . $this->view->url->linkTo('Main','index'))
			->assertResponse(200)
			->assertTitle('GnomePHP')
			->assertText('You see this page because')
			->click('Click here for a live unit test of the framework')
			->assertText('TestGnome')
			->assertResponse(200);
		

	}
	
	protected function testNotWorkingLink(){
		// This URL should not work...
		$this->browser($this->hostUrl . $this->view->url->linkTo('Main','index').'notvalid/link')
			->assertResponse(404);
	
	}
	
}
Return current item: GnomePHP