Conditions | 1 |
Paths | 1 |
Total Lines | 32 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function testInfo() { |
||
38 | $this->assertEmpty( |
||
39 | $this->getScribuntoLuaLibrary()->info( null ) |
||
40 | ); |
||
41 | $this->assertEmpty( |
||
42 | $this->getScribuntoLuaLibrary()->info( '' ) |
||
43 | ); |
||
44 | $this->assertInternalType( |
||
45 | 'string', |
||
46 | $this->getScribuntoLuaLibrary()->info( 'Test info text' )[0] |
||
47 | ); |
||
48 | $this->assertStringStartsWith( |
||
49 | '<span', |
||
50 | $this->getScribuntoLuaLibrary()->info( 'Test info text' )[0] |
||
51 | ); |
||
52 | $this->assertStringEndsWith( |
||
53 | '</span>', |
||
54 | $this->getScribuntoLuaLibrary()->info( 'Test info text' )[0] |
||
55 | ); |
||
56 | $this->assertEquals( |
||
57 | 1, |
||
58 | preg_match('~^<span class=.*<span class="[^"]*info">.*>Test info text<.*</span>$~', $this->getScribuntoLuaLibrary()->info( 'Test info text' )[0]) |
||
59 | ); |
||
60 | $this->assertEquals( |
||
61 | 1, |
||
62 | preg_match('~^<span class=.*<span class="[^"]*warning">.*>Test info text<.*</span>$~', $this->getScribuntoLuaLibrary()->info( 'Test info text', 'warning' )[0]) |
||
63 | ); |
||
64 | $this->assertEquals( |
||
65 | 1, |
||
66 | preg_match('~^<span class=.*<span class="[^"]*info">.*>Test info text<.*</span>$~', $this->getScribuntoLuaLibrary()->info( 'Test info text', 'invalid' )[0]) |
||
67 | ); |
||
68 | } |
||
69 | } |