|
@@ 47-55 (lines=9) @@
|
| 44 |
|
/** |
| 45 |
|
* Tests that the processor is able to successfully tokenize and untokenize paths. |
| 46 |
|
*/ |
| 47 |
|
public function test_handles_path_tokenization_and_untokenization() { |
| 48 |
|
$path = $this->processor->tokenize_path_constants( WP_PLUGIN_DIR . '/dummy_current' ); |
| 49 |
|
|
| 50 |
|
$this->assertEquals( '{{WP_PLUGIN_DIR}}/dummy_current', $path ); |
| 51 |
|
|
| 52 |
|
$path = $this->processor->untokenize_path_constants( $path ); |
| 53 |
|
|
| 54 |
|
$this->assertEquals( WP_PLUGIN_DIR . '/dummy_current', $path ); |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
/** |
| 58 |
|
* Tests that the processor is able to successfully tokenize and untokenize paths on Windows. |
|
@@ 60-68 (lines=9) @@
|
| 57 |
|
/** |
| 58 |
|
* Tests that the processor is able to successfully tokenize and untokenize paths on Windows. |
| 59 |
|
*/ |
| 60 |
|
public function test_handles_path_tokenization_and_untokenization_with_windows_paths() { |
| 61 |
|
$path = $this->processor->tokenize_path_constants( WP_PLUGIN_DIR . '/dummy_current' ); |
| 62 |
|
|
| 63 |
|
$this->assertEquals( '{{WP_PLUGIN_DIR}}/dummy_current', $path ); |
| 64 |
|
|
| 65 |
|
$path = $this->processor->untokenize_path_constants( $path ); |
| 66 |
|
|
| 67 |
|
$this->assertEquals( WP_PLUGIN_DIR . '/dummy_current', $path ); |
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
/** |
| 71 |
|
* Tests that the processor resolves symlinks when untokenizing. |