forked from EFTEC/BladeOne
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEachTest.php
More file actions
42 lines (37 loc) · 1022 Bytes
/
Copy pathEachTest.php
File metadata and controls
42 lines (37 loc) · 1022 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace eftec\tests;
/**
* @author G.J.W. Oolbekkink <g.j.w.oolbekkink@gmail.com>
* @since 17/09/2018
*/
class EachTest extends AbstractBladeTestCase
{
/**
* @throws \Exception
*/
public function testEachEmpty()
{
$this->assertEqualsIgnoringWhitespace("", $this->blade->run("each.base", ["list" => []]));
}
/**
* @throws \Exception
*/
public function testEachMultiple()
{
$this->assertEqualsIgnoringWhitespace("Item 1... Item item...", $this->blade->run("each.base", ["list" => [1, "item"]]));
}
/**
* @throws \Exception
*/
public function testEachEmptyOption()
{
$this->assertEqualsIgnoringWhitespace("No Item", $this->blade->run("each.empty", ["list" => []]));
}
/**
* @throws \Exception
*/
public function testEachEmptyMultiple()
{
$this->assertEqualsIgnoringWhitespace("Item Elem... Item item...", $this->blade->run("each.empty", ["list" => ["Elem", "item"]]));
}
}