Overview
Comment:Plus de tests unitaires basiques
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 764cdbfb003415bf9e3981c9d7f74ef1ffcb7ae8
User & Date: bohwaz on 2017-03-07 04:32:36
Other Links: branch diff | manifest | tags
Context
2017-03-09
04:29
DB: Ajoute la possibilité optionnelle de retourner un résultat sous forme d'objet plutôt que de tableau check-in: a2973bcf60 user: bohwaz tags: dev
2017-03-07
04:32
Plus de tests unitaires basiques check-in: 764cdbfb00 user: bohwaz tags: dev
2017-03-06
23:20
Ajout notifications IRC check-in: 3257730d6c user: bohwaz tags: dev
Changes

Modified tests/run.php from [ab67cb34c7] to [e0e24bf932].

1
2

3

4



5
6

7

8


9




10

11





<?php


namespace Garradin;





use KD2\Test;


require __DIR__ . '/../src/include/init.php';




Test::assert(garradin_version());




Test::assert(defined('Garradin\ROOT'));

Test::assert(is_readable(ROOT));







>
|
>
|
>
>
>
|
|
>
|
>

>
>
|
>
>
>
>
|
>
|
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

require __DIR__ . '/../src/include/init.php';

if (!empty($_SERVER['argv'][1]))
{
	require $_SERVER['argv'][1];
	exit;
}
else
{
	// Lister et exécuter tous les tests unitaires
	$dir = new RecursiveDirectoryIterator(__DIR__ . '/unit_tests');
	$iterator = new RecursiveIteratorIterator($dir);

	$files = new RegexIterator($iterator, '/^.*\.php$/i', RecursiveRegexIterator::GET_MATCH);
	$list = [];

	foreach ($files as $file)
	{
		$list[] = $file[0];
	}

	natcasesort($list);

	foreach ($list as $file)
	{
		require $file;
	}
}

Added tests/unit_tests/01_basic/paths.php version [eb87188fc7].







































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

namespace Garradin;
use KD2\Test;

Test::assert(defined('Garradin\ROOT'));
Test::assert(is_readable(ROOT));

Test::assert(defined('Garradin\PLUGINS_ROOT'));
Test::assert(is_readable(PLUGINS_ROOT));

Test::assert(defined('Garradin\DATA_ROOT'));
Test::assert(is_readable(DATA_ROOT));
Test::assert(is_writeable(DATA_ROOT));

Test::assert(defined('Garradin\CACHE_ROOT'));
Test::assert(is_readable(CACHE_ROOT));
Test::assert(is_writeable(CACHE_ROOT));

Added tests/unit_tests/01_basic/version.php version [730bdaf2e0].















>
>
>
>
>
>
>
1
2
3
4
5
6
7
<?php

namespace Garradin;
use KD2\Test;

Test::assert(function_exists('Garradin\garradin_version'));
Test::assert(garradin_version());