◆ testConstruct()
ILIAS\Tests\Refinery\IsExecutableTransformationTest::testConstruct |
( |
| ) |
|
Definition at line 29 of file IsExecutableTransformationTest.php.
29 : void
30 {
31 $language = $this->getMockBuilder(Language::class)->disableOriginalConstructor()->getMock();
32 $this->assertInstanceOf(IsExecutableTransformation::class, new IsExecutableTransformation($language));
33 }
◆ testFailingAccept()
ILIAS\Tests\Refinery\IsExecutableTransformationTest::testFailingAccept |
( |
| ) |
|
Definition at line 35 of file IsExecutableTransformationTest.php.
35 : void
36 {
37 $language = $this->getMockBuilder(Language::class)->disableOriginalConstructor()->getMock();
38 $transformation = new IsExecutableTransformation($language);
39
40 $this->assertFalse($transformation->accepts('I hope this string is no valid path...'));
41 }
◆ testSuccessfulAccept()
ILIAS\Tests\Refinery\IsExecutableTransformationTest::testSuccessfulAccept |
( |
| ) |
|
Definition at line 43 of file IsExecutableTransformationTest.php.
43 : void
44 {
45 if (!is_file('/bin/sh')) {
46 $this->markTestSkipped('Shell /bin/sh is not available.');
47 return;
48 }
49 $language = $this->getMockBuilder(Language::class)->disableOriginalConstructor()->getMock();
50 $transformation = new IsExecutableTransformation($language);
51
52 $this->assertTrue($transformation->accepts('/bin/sh'));
53 }
The documentation for this class was generated from the following file: