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 | |
public function testEnvoi_destinataires_du_mail() | |
{ | |
$this->assertUsePhpMail(); | |
$this->assertTrue($this->module->envoiMail()); | |
$mail = json_decode(file_get_contents('/tmp/lastmail')); | |
$destinataires = $mail->bcc; |
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
#!/bin/env php | |
<?php | |
// suppression du cache (pas necessaire) | |
`sudo rm -Rf /home/seb/dev/htdocs/perso/lblog/app/storage/cache/*`; | |
// premier appel de la page, pour créer le cache, il faut donc s'assurer que le cache 'file' est bien activé avant. | |
`wget http://localhost/perso/lblog/public/aut-ex-accusantium-quo-tenetur-harum -q -O /tmp/o`; | |
// second appel de la page, contenu stocké dans /tmp/o et header stocké dans /tmp/h, au cas ou la page ne serait pas présente dans la base a se moment (ou non public) | |
`wget http://localhost/perso/lblog/public/aut-ex-accusantium-quo-tenetur-harum -O /tmp/o -o /tmp/h`; | |
$headers = file_get_contents('/tmp/h'); |
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 | |
$I = new WebGuy($scenario); | |
$I->wantTo('check bloc promotions'); | |
$I->amOnPage('/test.html'); | |
$I->see('TODO supply a title'); | |
$input_val = $I->grabValueFrom('input[name=email]'); // | |
\PHPUnit_Framework_Assert::assertEquals('votre e-mail', $input_val ); | |
$I->dontSeeError(); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>TODO supply a title</title> | |
</head> | |
<body> | |
<div id="newsletter_block"> | |
<form> | |
<input type="text" value="ma val" name="email" /> | |
<input type="submit" /> |
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
# features/login.feature | |
Feature: login | |
Vérification que user peut se logger | |
Scenario: accueil du site -> click sur s'identifier -> saisir données et vérifier que loggé | |
Given I am on homepage | |
Then I should see "Bienvenue, identifiez-vous" in the "p#header_user_info" element | |
When I follow "identifiez-vous" | |
Then I should see "Déjà enregistré ?" |
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
$url_str = "array('site/page', 'view' => 'contact')"; | |
$url_array = $this->evaluateExpression($url_str); | |
echo CHtml::link('Mon lien', $url_array); |
NewerOlder