This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Phalcon\Mvc\Controller; | |
class TestController extends Controller | |
{ | |
public function indexAction() { | |
//If this controller responds to abc.com/aa/bb/cc | |
//the $uri value will be: /aa/bb/cc | |
$uri = $this->request->getURI(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.test.begin('Testing index of blog.fernando.inf.br', 1, function (test){ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.test.begin('Testing index of blog.fernando.inf.br', 1, function (test){ | |
casper.run(function(){ | |
test.done(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.test.begin('Testing index of blog.fernando.inf.br', 1, function (test){ | |
casper.start('http://blog.fabricio.inf.br', function(){ | |
}); | |
casper.run(function(){ | |
test.done(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.test.begin('Testing index of blog.fernando.inf.br', 3, function (test){ | |
casper.start('http://blog.fabricio.inf.br', function(){ | |
test.assertHttpStatus(200); | |
test.assertTitle('Fernando Fabricio'); | |
test.assertEquals(this.getHTML('#header-inner > div.titlewrapper > h1'), "\nFernando Fabricio\n"); | |
}); | |
casper.run(function(){ | |
test.done(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Phalcon\Mvc\Controller; | |
use Phalcon\Mvc\View\Simple as SimpleView; | |
class TestController extends Controller | |
{ | |
public functino testAction() { | |
$this->view = new SimpleView(); | |
$this->view->setViewsDir('/your/view/directory'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.test.begin('Testing index of blog.fernando.inf.br', 5, function(test) { | |
casper.start('http://blog.fabricio.inf.br', function() { | |
test.assertHttpStatus(200); | |
}); | |
casper.then(function() { | |
test.assertExists('head > title'); | |
test.assertExists('#header-inner > div.titlewrapper > h1'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.test.begin('Testing index of blog.fernando.inf.br', 3, function(test) { | |
casper.start('http://blog.fabricio.inf.br', function() { | |
test.assertHttpStatus(200); | |
}); | |
casper.then(function() { | |
casper.waitForSelector( | |
'#header-inner > div.titlewrapper > h1', | |
function then() { | |
test.assertTitle('Fernando Fabricio'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.capture('yourbealtyfullscree.jpg', { | |
top: 0, | |
left: 0, | |
width: 1600, | |
height: 900 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.test.begin('Testing index of blog.fernando.inf.br', 5, function(test) { | |
casper.start('http://blog.fabricio.inf.br', function() { | |
test.assertHttpStatus(200); | |
}); | |
casper.then(function() { | |
test.assertExists('head > title'); | |
test.assertExists('#header-inner > div.titlewrapper > h1'); | |
}); |
OlderNewer