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); |
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
<!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
<?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
#!/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 | |
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 | |
/** | |
* add files to .gitignore. | |
* Put this file in your bin dir (/home/<username>/bin/), make it executable (chmod +x /home/<username>/bin/gitingore.php). Done. | |
**/ | |
// remove script name | |
array_shift($argv); | |
// arguments are file name | |
$files = $argv; |
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 | |
/** | |
* Class DbPDOCore | |
* | |
* /override/classes/db/DbPDO.php | |
* @since 1.5.0.1 | |
*/ | |
class DbPDO extends DbPDOCore | |
{ |
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 | |
/** | |
* This is just a simple example how to use mikey179/vfsStream - https://github.com/mikey179/vfsStream | |
* | |
* Don't be fooled by the documentation. | |
* This lib is great but the documentation can let you thinks it's complicated or not 'natural' filesystem usage. | |
* This lib register a php stream so you can (almost) use filesystem function in a regular fashion. | |
* | |
* @see http://php.net/manual/en/book.stream.php | |
* @see http://php.net/manual/en/stream.streamwrapper.example-1.php |
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 | |
/** | |
* check sendtoafriend module vulnerability | |
* | |
* run it in terminal | |
* | |
* @link https://blog.seb7.fr/a/faille-sécurité-prestashop-module-envoyer-a-un-ami | |
* @author seb7.fr | |
*/ |
OlderNewer