Browse Source

lanceur de tests plus robuste

pull/11/head
Cerdic 1 year ago
parent
commit
b21a796351
  1. 17
      tests/normaliser_date.php
  2. 17
      tests/verifier_date.php
  3. 17
      tests/verifier_telephone.php

17
tests/normaliser_date.php

@ -7,11 +7,18 @@
$test = 'normaliser_date_datetime_dist';
$remonte = "../";
while (!is_dir($remonte . "ecrire"))
$remonte = "../$remonte";
require $remonte . 'tests/test.inc';
$remonte = "";
while (!is_file($remonte."test.inc") and !is_dir($remonte.'ecrire/'))
$remonte = $remonte."../";
foreach ([$remonte."test.inc", $remonte."tests/test.inc", $remonte."tests/tests/legacy/test.inc"] as $f) {
if (is_file($f)){
require $f;
break;
}
}
if (!defined('_SPIP_TEST_INC')) {
die('Impossible de trouver test.inc depuis ' .getcwd());
}
//

17
tests/verifier_date.php

@ -7,11 +7,18 @@
$test = 'verifier_date';
$remonte = "../";
while (!is_dir($remonte . "ecrire"))
$remonte = "../$remonte";
require $remonte . 'tests/test.inc';
$remonte = "";
while (!is_file($remonte."test.inc") and !is_dir($remonte.'ecrire/'))
$remonte = $remonte."../";
foreach ([$remonte."test.inc", $remonte."tests/test.inc", $remonte."tests/tests/legacy/test.inc"] as $f) {
if (is_file($f)){
require $f;
break;
}
}
if (!defined('_SPIP_TEST_INC')) {
die('Impossible de trouver test.inc depuis ' .getcwd());
}
//

17
tests/verifier_telephone.php

@ -7,11 +7,18 @@
$test = 'verifier_telephone';
$remonte = "../";
while (!is_dir($remonte . "ecrire"))
$remonte = "../$remonte";
require $remonte . 'tests/test.inc';
$remonte = "";
while (!is_file($remonte."test.inc") and !is_dir($remonte.'ecrire/'))
$remonte = $remonte."../";
foreach ([$remonte."test.inc", $remonte."tests/test.inc", $remonte."tests/tests/legacy/test.inc"] as $f) {
if (is_file($f)){
require $f;
break;
}
}
if (!defined('_SPIP_TEST_INC')) {
die('Impossible de trouver test.inc depuis ' .getcwd());
}
//

Loading…
Cancel
Save