| Total Complexity | 2 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| 1 | import os |
||
| 13 | class PHPLintBearTest(LocalBearTestHelper): |
||
| 14 | def setUp(self): |
||
| 15 | self.section = Section("test section") |
||
| 16 | self.uut = PHPLintBear(self.section, Queue()) |
||
| 17 | self.test_file1 = os.path.join(os.path.dirname(__file__), |
||
| 18 | "test_files", |
||
| 19 | "phplint_test1.php") |
||
| 20 | self.test_file2 = os.path.join(os.path.dirname(__file__), |
||
| 21 | "test_files", |
||
| 22 | "phplint_test2.php") |
||
| 23 | |||
| 24 | def test_run(self): |
||
| 25 | # Test a file with errors and warnings |
||
| 26 | self.assertLinesInvalid( |
||
| 27 | self.uut, |
||
| 28 | [], |
||
| 29 | self.test_file1) |
||
| 30 | |||
| 31 | # Test a file without any issues |
||
| 32 | self.assertLinesValid( |
||
| 33 | self.uut, |
||
| 34 | [], |
||
| 35 | self.test_file2) |
||
| 36 | |||
| 50 |