Skip to content

Commit

Permalink
Move \K test to Feature/ test
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Jun 30, 2023
1 parent 017263c commit 9e3bd04
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
21 changes: 21 additions & 0 deletions test/Feature/CleanRegex/_prepared/_syntax/Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
namespace Test\Feature\CleanRegex\_prepared\_syntax;

use PHPUnit\Framework\TestCase;
use TRegx\CleanRegex\Pattern;

class Test extends TestCase
{
/**
* @test
*/
public function shouldResetCapturedString()
{
// given
$pattern = Pattern::of('foo\Kbar');
// when
$match = $pattern->search('foobar')->first();
// then
$this->assertSame('bar', $match);
}
}
13 changes: 0 additions & 13 deletions test/Legacy/CleanRegex/Internal/Prepared/PatternEntitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,6 @@ class PatternEntitiesTest extends TestCase
{
use PcreDependant;

/**
* @test
*/
public function shouldParseLookAroundAssertion()
{
// given
$asEntities = new PatternEntities(new SubpatternFlagsStringPattern('\K', SubpatternFlags::empty()), new ThrowAutoCapture(), new ThrowPlaceholders());
// when, then
$this->assertEntitiesEqual($asEntities, [
new Escaped('K')
]);
}

/**
* @test
*/
Expand Down

0 comments on commit 9e3bd04

Please sign in to comment.