|
@@ 34-42 (lines=9) @@
|
| 31 |
|
/** |
| 32 |
|
* Tests that the process is able to successfully tokenize and untokenize paths. |
| 33 |
|
*/ |
| 34 |
|
public function test_handles_path_tokenization_and_untokenization() { |
| 35 |
|
$path = $this->processor->tokenize_path_constants( WP_PLUGIN_DIR . '/test/path' ); |
| 36 |
|
|
| 37 |
|
$this->assertEquals( '{{WP_PLUGIN_DIR}}/test/path', $path ); |
| 38 |
|
|
| 39 |
|
$path = $this->processor->untokenize_path_constants( $path ); |
| 40 |
|
|
| 41 |
|
$this->assertEquals( WP_PLUGIN_DIR . '/test/path', $path ); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* Tests that find_directory_with_autoloader is able to successfully tokenize and untokenize paths on Windows. |
|
@@ 47-55 (lines=9) @@
|
| 44 |
|
/** |
| 45 |
|
* Tests that find_directory_with_autoloader is able to successfully tokenize and untokenize paths on Windows. |
| 46 |
|
*/ |
| 47 |
|
public function test_handles_path_tokenization_and_untokenization_with_windows_paths() { |
| 48 |
|
$path = $this->processor->tokenize_path_constants( WP_PLUGIN_DIR . '/test/path' ); |
| 49 |
|
|
| 50 |
|
$this->assertEquals( '{{WP_PLUGIN_DIR}}/test/path', $path ); |
| 51 |
|
|
| 52 |
|
$path = $this->processor->untokenize_path_constants( $path ); |
| 53 |
|
|
| 54 |
|
$this->assertEquals( WP_PLUGIN_DIR . '/test/path', $path ); |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
/** |
| 58 |
|
* Tests that find_directory_with_autoloader does not work on non-PHP files. |