-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcea850
commit 25abef0
Showing
3 changed files
with
26 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Tests\Unit; | ||
|
||
use Illuminate\Support\Str; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ApapParsingTest extends TestCase | ||
{ | ||
/** | ||
* A basic test example. | ||
* | ||
* @return void | ||
*/ | ||
public function testShouldParseProductName() | ||
{ | ||
$productLine = "Tu tarjeta de Crédito titular-Visa GoldAPAP terminada en 7106 presenta una transacción, con el siguiente detalle:"; | ||
$visaPos = strpos($productLine, 'Visa'); | ||
|
||
$product = Str::substr($productLine, $visaPos - 1, strpos($productLine, 'terminada') - $visaPos - 1); | ||
$this->assertEquals($product, "Visa GoldAPAP"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,7 @@ public function test_example() | |
{ | ||
$this->assertTrue(true); | ||
} | ||
|
||
|
||
|
||
} |