Completed
Push — master ( 6c1ed5...22fbb1 )
by cam
02:28
created
ecrire/tests/Squelettes/Balise/InclureStatiqueTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,52 +11,52 @@
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
ecrire/tests/Squelettes/Balise/NotesTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
 	/**
Please login to merge, or discard this patch.
tests/Squelettes/Balise/data/squelettes/formulaires/test_dyn_lang.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
tests/Squelettes/Balise/data/squelettes/balise/formulaire_test_phraseur.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
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 [
Please login to merge, or discard this patch.
ecrire/tests/Squelettes/Balise/BaliseDetacheeTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,6 +41,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
ecrire/tests/Squelettes/Balise/InclureTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,52 +11,52 @@
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
ecrire/tests/Squelettes/Cache/CacheSessionTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 	private static string $squelettes;
15 15
 
16 16
 	public static function setUpBeforeClass(): void {
17
-		self::$squelettes = self::relativePath(__DIR__ . '/data/squelettes');
17
+		self::$squelettes = self::relativePath(__DIR__.'/data/squelettes');
18 18
 		$GLOBALS['dossier_squelettes'] = self::$squelettes;
19 19
 		$GLOBALS['delais'] = 3600; // See boostrap.php qui met delais = 0 (inhibe le cache)
20 20
 		include_spip('inc/invalideur');
21
-		purger_repertoire(_DIR_CACHE . 'calcul/', ['subdir' => true]);
21
+		purger_repertoire(_DIR_CACHE.'calcul/', ['subdir' => true]);
22 22
 	}
23 23
 
24 24
 	public static function tearDownAfterClass(): void {
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function testVerifierPathMajInvalideurs(): void {
34 34
 		$this->assertEquals(self::$squelettes, $GLOBALS['dossier_squelettes'] ?? null);
35
-		$this->assertTrue(file_exists(__DIR__ . '/data/squelettes/inc/maj_invalideurs.php'));
35
+		$this->assertTrue(file_exists(__DIR__.'/data/squelettes/inc/maj_invalideurs.php'));
36 36
 		$this->assertNotFalse(find_in_path('inc/maj_invalideurs.php'));
37 37
 		$this->assertNotFalse(include_spip('inc/maj_invalideurs'));
38 38
 		$this->assertEquals('inc_maj_invalideurs', charger_fonction('maj_invalideurs', 'inc', true));
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	}
94 94
 
95 95
 	private function saltContext(): string {
96
-		return (string) time() . ':' . uniqid();
96
+		return (string) time().':'.uniqid();
97 97
 	}
98 98
 
99 99
 	private function getErrors(): array {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	}
102 102
 
103 103
 	private function showErrors(): string {
104
-		return "Errors:\n" . implode("\n", array_map(fn ($e) => "- $e", self::getErrors()));
104
+		return "Errors:\n".implode("\n", array_map(fn ($e) => "- $e", self::getErrors()));
105 105
 	}
106 106
 
107 107
 	private function resetErrors(): void {
Please login to merge, or discard this patch.
ecrire/tests/Squelettes/Boucle/BoucleGeneriqueTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,6 +44,6 @@
 block discarded – undo
44 44
 	 * @link http://trac.rezo.net/trac/spip/ticket/1931
45 45
 	 */
46 46
 	public function testBoucleVide(): void {
47
-		$this->assertOkSquelette(__DIR__ . '/data/boucle_vide.html');
47
+		$this->assertOkSquelette(__DIR__.'/data/boucle_vide.html');
48 48
 	}
49 49
 }
Please login to merge, or discard this patch.
ecrire/tests/Squelettes/Boucle/BoucleRecursiveTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
 	 * @link http://trac.rezo.net/trac/spip/ticket/764
13 13
 	 */
14 14
 	public function testBoucleRecursiveSet(): void {
15
-		$this->assertOkSquelette(__DIR__ . '/data/bug764.html');
15
+		$this->assertOkSquelette(__DIR__.'/data/bug764.html');
16 16
 	}
17 17
 }
Please login to merge, or discard this patch.