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('Cow can moo', 2, { | |
setUp: function(test) { | |
this.cow = new Cow(); | |
}, | |
tearDown: function(test) { | |
this.cow.destroy(); | |
}, | |
test: 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', 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.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', 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.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
<?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', 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
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', 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){ | |
}); |