@@ -15,14 +15,14 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | public function testExposerRubrique(): void { |
| 17 | 17 | $id_rubrique = sql_getfetsel('id_rubrique', 'spip_rubriques', [ |
| 18 | - 'id_parent=' . sql_quote(0), |
|
| 19 | - 'statut=' . sql_quote('publie'), |
|
| 18 | + 'id_parent='.sql_quote(0), |
|
| 19 | + 'statut='.sql_quote('publie'), |
|
| 20 | 20 | ]); |
| 21 | 21 | |
| 22 | 22 | $id_seconde_rubrique = sql_getfetsel('id_rubrique', 'spip_rubriques', [ |
| 23 | - 'id_parent=' . sql_quote(0), |
|
| 24 | - 'statut=' . sql_quote('publie'), |
|
| 25 | - 'id_rubrique != ' . (int) $id_rubrique, |
|
| 23 | + 'id_parent='.sql_quote(0), |
|
| 24 | + 'statut='.sql_quote('publie'), |
|
| 25 | + 'id_rubrique != '.(int) $id_rubrique, |
|
| 26 | 26 | ]); |
| 27 | 27 | |
| 28 | 28 | if (!$id_rubrique || !$id_seconde_rubrique) { |
@@ -50,6 +50,6 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | #[Depends('testExposerRubrique')] |
| 52 | 52 | public function testExposerRubriqueInclus(): void { |
| 53 | - $this->assertOkSquelette(__DIR__ . '/data/balise_expose.html'); |
|
| 53 | + $this->assertOkSquelette(__DIR__.'/data/balise_expose.html'); |
|
| 54 | 54 | } |
| 55 | 55 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | class BaliseDynamiquePhraserTest extends SquelettesTestCase |
| 11 | 11 | { |
| 12 | 12 | public static function setUpBeforeClass(): void { |
| 13 | - $GLOBALS['dossier_squelettes'] = self::relativePath(__DIR__ . '/data/squelettes'); |
|
| 13 | + $GLOBALS['dossier_squelettes'] = self::relativePath(__DIR__.'/data/squelettes'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function testBaliseDynamiquePhraser(): void { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $code = '<BOUCLE_a(ARTICLES){id_article}{tout}{0,1}>#INTRODUCTION</BOUCLE_a>'; |
| 30 | 30 | $result = $templating->render($code, ['id_article' => $id_article]); |
| 31 | 31 | $suite = ' (...)'; |
| 32 | - $this->assertMatchesRegularExpression('#' . preg_quote($suite . '</p>', '#') . '$#', $result); |
|
| 32 | + $this->assertMatchesRegularExpression('#'.preg_quote($suite.'</p>', '#').'$#', $result); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | #[Depends('testArticleLongExiste')] |
@@ -39,14 +39,14 @@ discard block |
||
| 39 | 39 | $code = '<BOUCLE_a(ARTICLES){id_article}{tout}{0,1}>#INTRODUCTION{…}</BOUCLE_a>'; |
| 40 | 40 | $result = $templating->render($code, ['id_article' => $id_article]); |
| 41 | 41 | $suite = '…'; |
| 42 | - $this->assertMatchesRegularExpression('#' . preg_quote($suite . '</p>', '#') . '$#', $result); |
|
| 42 | + $this->assertMatchesRegularExpression('#'.preg_quote($suite.'</p>', '#').'$#', $result); |
|
| 43 | 43 | |
| 44 | 44 | $code = '<BOUCLE_a(ARTICLES){id_article}{tout}{0,1}>#INTRODUCTION{#ENV{suite}}</BOUCLE_a>'; |
| 45 | 45 | $result = $templating->render($code, [ |
| 46 | 46 | 'id_article' => $id_article, |
| 47 | 47 | 'suite' => $suite, |
| 48 | 48 | ]); |
| 49 | - $this->assertMatchesRegularExpression('#' . preg_quote($suite . '</p>', '#') . '$#', $result); |
|
| 49 | + $this->assertMatchesRegularExpression('#'.preg_quote($suite.'</p>', '#').'$#', $result); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | #[Depends('testCoupeIntroduction')] |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $code = '#CACHE{0}<BOUCLE_a(ARTICLES){id_article}{tout}{0,1}>#INTRODUCTION</BOUCLE_a>'; |
| 63 | 63 | $result = $templating->render($code, ['id_article' => $id_article]); |
| 64 | 64 | $suite = _INTRODUCTION_SUITE; |
| 65 | - $this->assertMatchesRegularExpression('#' . preg_quote($suite . '</p>', '#') . '$#', $result); |
|
| 65 | + $this->assertMatchesRegularExpression('#'.preg_quote($suite.'</p>', '#').'$#', $result); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | protected function getIdArticleLong(): int { |
@@ -11,52 +11,52 @@ |
||
| 11 | 11 | { |
| 12 | 12 | public function testInclureInlineNormal(): void { |
| 13 | 13 | $dir = $this->relativePath(__DIR__); |
| 14 | - $this->assertEqualsCode('Hello World', '#INCLURE{fond=' . $dir . '/data/texte_hello_world}'); |
|
| 15 | - $this->assertEqualsCode('Hello World', '[(#INCLURE{fond=' . $dir . '/data/texte_hello_world})]'); |
|
| 14 | + $this->assertEqualsCode('Hello World', '#INCLURE{fond='.$dir.'/data/texte_hello_world}'); |
|
| 15 | + $this->assertEqualsCode('Hello World', '[(#INCLURE{fond='.$dir.'/data/texte_hello_world})]'); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function testInclureDouble(): void { |
| 19 | 19 | $dir = $this->relativePath(__DIR__); |
| 20 | 20 | $this->assertEqualsCode( |
| 21 | 21 | 'Hello WorldHello World', |
| 22 | - '#INCLURE{fond=' . $dir . '/data/texte_hello_world}' |
|
| 23 | - . '#INCLURE{fond=' . $dir . '/data/texte_hello_world}' |
|
| 22 | + '#INCLURE{fond='.$dir.'/data/texte_hello_world}' |
|
| 23 | + . '#INCLURE{fond='.$dir.'/data/texte_hello_world}' |
|
| 24 | 24 | ); |
| 25 | 25 | $this->assertEqualsCode( |
| 26 | 26 | 'Hello WorldHello World', |
| 27 | 27 | ' |
| 28 | - #INCLURE{fond=' . $dir . '/data/texte_hello_world}' |
|
| 29 | - . '#INCLURE{fond=' . $dir . '/data/texte_hello_world}' |
|
| 28 | + #INCLURE{fond=' . $dir.'/data/texte_hello_world}' |
|
| 29 | + . '#INCLURE{fond='.$dir.'/data/texte_hello_world}' |
|
| 30 | 30 | ); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function testInclureArray(): void { |
| 34 | 34 | $dir = $this->relativePath(__DIR__); |
| 35 | 35 | $array = '#LISTE{ |
| 36 | - ' . $dir . '/data/texte_hello_world, |
|
| 37 | - ' . $dir . '/data/texte_hello_world, |
|
| 38 | - ' . $dir . '/data/texte_hello_world}'; |
|
| 36 | + ' . $dir.'/data/texte_hello_world, |
|
| 37 | + ' . $dir.'/data/texte_hello_world, |
|
| 38 | + ' . $dir.'/data/texte_hello_world}'; |
|
| 39 | 39 | $this->assertEqualsCode('Hello WorldHello WorldHello World', "#INCLURE{fond={$array}}"); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function testInclureOldParam(): void { |
| 43 | 43 | $dir = $this->relativePath(__DIR__); |
| 44 | - $this->assertEqualsCode('Kitty', '[(#INCLURE{fond=' . $dir . '/data/balise_env_test}{test=Kitty})]'); |
|
| 45 | - $this->assertEqualsCode('Kitty', '[(#INCLURE{fond=' . $dir . '/data/balise_env_test}{test=Kitty})]'); |
|
| 44 | + $this->assertEqualsCode('Kitty', '[(#INCLURE{fond='.$dir.'/data/balise_env_test}{test=Kitty})]'); |
|
| 45 | + $this->assertEqualsCode('Kitty', '[(#INCLURE{fond='.$dir.'/data/balise_env_test}{test=Kitty})]'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function testInclureNormalParam(): void { |
| 49 | 49 | $dir = $this->relativePath(__DIR__); |
| 50 | - $this->assertEqualsCode('Kitty', '[(#INCLURE{fond=' . $dir . '/data/balise_env_test, test=Kitty})]'); |
|
| 51 | - $this->assertEqualsCode('Kitty', '[(#INCLURE{fond=' . $dir . '/data/balise_env_test, test=Kitty})]'); |
|
| 50 | + $this->assertEqualsCode('Kitty', '[(#INCLURE{fond='.$dir.'/data/balise_env_test, test=Kitty})]'); |
|
| 51 | + $this->assertEqualsCode('Kitty', '[(#INCLURE{fond='.$dir.'/data/balise_env_test, test=Kitty})]'); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | public function testInclureArrayParam(): void { |
| 55 | 55 | $dir = $this->relativePath(__DIR__); |
| 56 | 56 | $array = '#LISTE{ |
| 57 | - ' . $dir . '/data/balise_env_test, |
|
| 58 | - ' . $dir . '/data/texte_hello_world, |
|
| 59 | - ' . $dir . '/data/balise_env_test}'; |
|
| 57 | + ' . $dir.'/data/balise_env_test, |
|
| 58 | + ' . $dir.'/data/texte_hello_world, |
|
| 59 | + ' . $dir.'/data/balise_env_test}'; |
|
| 60 | 60 | $this->assertEqualsCode('KittyHello WorldKitty', "[(#INCLURE{fond={$array}, test=Kitty})]"); |
| 61 | 61 | $this->assertEqualsCode('KittyHello WorldKitty', "[(#INCLURE{fond={$array}, test=Kitty})]"); |
| 62 | 62 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | public function testNotesEnVrac(): void { |
| 16 | - $this->assertOkSquelette(__DIR__ . '/data/notes.html'); |
|
| 16 | + $this->assertOkSquelette(__DIR__.'/data/notes.html'); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
@@ -4,6 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | function formulaires_test_dyn_lang_charger_dist($lang_skel) { |
| 6 | 6 | return [ |
| 7 | - 'message_ok' => $lang_skel === $GLOBALS['spip_lang'] ? 'OK' : "NOK : La langue dans le squelette appelant est {$lang_skel} mais la langue dans charger() est " . $GLOBALS['spip_lang'], |
|
| 7 | + 'message_ok' => $lang_skel === $GLOBALS['spip_lang'] ? 'OK' : "NOK : La langue dans le squelette appelant est {$lang_skel} mais la langue dans charger() est ".$GLOBALS['spip_lang'], |
|
| 8 | 8 | ]; |
| 9 | 9 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $res = 'OK'; |
| 36 | 36 | |
| 37 | 37 | if (!preg_match('#^\d+$#', $id_rubrique)) { |
| 38 | - $res = 'Erreur id_rubrique non numerique : ' . var_export($id_rubrique, true); |
|
| 38 | + $res = 'Erreur id_rubrique non numerique : '.var_export($id_rubrique, true); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | return [ |
@@ -41,6 +41,6 @@ |
||
| 41 | 41 | * @depends testBaliseDetacheeInterne |
| 42 | 42 | */ |
| 43 | 43 | public function testBaliseDetacheeComplexe(): void { |
| 44 | - $this->assertOkSquelette(__DIR__ . '/data/balise_detachee.html'); |
|
| 44 | + $this->assertOkSquelette(__DIR__.'/data/balise_detachee.html'); |
|
| 45 | 45 | } |
| 46 | 46 | } |
@@ -11,52 +11,52 @@ |
||
| 11 | 11 | { |
| 12 | 12 | public function testInclureNormal(): void { |
| 13 | 13 | $dir = $this->relativePath(__DIR__); |
| 14 | - $this->assertEqualsCode('Hello World', '<INCLURE{fond=' . $dir . '/data/texte_hello_world}>'); |
|
| 15 | - $this->assertEqualsCode('Hello World', '<INCLURE{fond=' . $dir . '/data/texte_hello_world}/>'); |
|
| 14 | + $this->assertEqualsCode('Hello World', '<INCLURE{fond='.$dir.'/data/texte_hello_world}>'); |
|
| 15 | + $this->assertEqualsCode('Hello World', '<INCLURE{fond='.$dir.'/data/texte_hello_world}/>'); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function testInclureDouble(): void { |
| 19 | 19 | $dir = $this->relativePath(__DIR__); |
| 20 | 20 | $this->assertEqualsCode( |
| 21 | 21 | 'Hello WorldHello World', |
| 22 | - '<INCLURE{fond=' . $dir . '/data/texte_hello_world}>' |
|
| 23 | - . '<INCLURE{fond=' . $dir . '/data/texte_hello_world}>' |
|
| 22 | + '<INCLURE{fond='.$dir.'/data/texte_hello_world}>' |
|
| 23 | + . '<INCLURE{fond='.$dir.'/data/texte_hello_world}>' |
|
| 24 | 24 | ); |
| 25 | 25 | $this->assertEqualsCode( |
| 26 | 26 | 'Hello WorldHello World', |
| 27 | 27 | ' |
| 28 | - <INCLURE{fond=' . $dir . '/data/texte_hello_world}>' |
|
| 29 | - . '<INCLURE{fond=' . $dir . '/data/texte_hello_world}>' |
|
| 28 | + <INCLURE{fond=' . $dir.'/data/texte_hello_world}>' |
|
| 29 | + . '<INCLURE{fond='.$dir.'/data/texte_hello_world}>' |
|
| 30 | 30 | ); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function testInclureArray(): void { |
| 34 | 34 | $dir = $this->relativePath(__DIR__); |
| 35 | 35 | $array = '#LISTE{ |
| 36 | - ' . $dir . '/data/texte_hello_world, |
|
| 37 | - ' . $dir . '/data/texte_hello_world, |
|
| 38 | - ' . $dir . '/data/texte_hello_world}'; |
|
| 36 | + ' . $dir.'/data/texte_hello_world, |
|
| 37 | + ' . $dir.'/data/texte_hello_world, |
|
| 38 | + ' . $dir.'/data/texte_hello_world}'; |
|
| 39 | 39 | $this->assertEqualsCode('Hello WorldHello WorldHello World', "<INCLURE{fond={$array}}>"); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function testInclureOldParam(): void { |
| 43 | 43 | $dir = $this->relativePath(__DIR__); |
| 44 | - $this->assertEqualsCode('Kitty', '<INCLURE{fond=' . $dir . '/data/balise_env_test}{test=Kitty}>'); |
|
| 45 | - $this->assertEqualsCode('Kitty', '<INCLURE{fond=' . $dir . '/data/balise_env_test}{test=Kitty}/>'); |
|
| 44 | + $this->assertEqualsCode('Kitty', '<INCLURE{fond='.$dir.'/data/balise_env_test}{test=Kitty}>'); |
|
| 45 | + $this->assertEqualsCode('Kitty', '<INCLURE{fond='.$dir.'/data/balise_env_test}{test=Kitty}/>'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function testInclureNormalParam(): void { |
| 49 | 49 | $dir = $this->relativePath(__DIR__); |
| 50 | - $this->assertEqualsCode('Kitty', '<INCLURE{fond=' . $dir . '/data/balise_env_test, test=Kitty}>'); |
|
| 51 | - $this->assertEqualsCode('Kitty', '<INCLURE{fond=' . $dir . '/data/balise_env_test, test=Kitty}/>'); |
|
| 50 | + $this->assertEqualsCode('Kitty', '<INCLURE{fond='.$dir.'/data/balise_env_test, test=Kitty}>'); |
|
| 51 | + $this->assertEqualsCode('Kitty', '<INCLURE{fond='.$dir.'/data/balise_env_test, test=Kitty}/>'); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | public function testInclureArrayParam(): void { |
| 55 | 55 | $dir = $this->relativePath(__DIR__); |
| 56 | 56 | $array = '#LISTE{ |
| 57 | - ' . $dir . '/data/balise_env_test, |
|
| 58 | - ' . $dir . '/data/texte_hello_world, |
|
| 59 | - ' . $dir . '/data/balise_env_test}'; |
|
| 57 | + ' . $dir.'/data/balise_env_test, |
|
| 58 | + ' . $dir.'/data/texte_hello_world, |
|
| 59 | + ' . $dir.'/data/balise_env_test}'; |
|
| 60 | 60 | $this->assertEqualsCode('KittyHello WorldKitty', "<INCLURE{fond={$array}, test=Kitty}>"); |
| 61 | 61 | $this->assertEqualsCode('KittyHello WorldKitty', "<INCLURE{fond={$array}, test=Kitty}/>"); |
| 62 | 62 | } |