Skip to content

Commit

Permalink
test: rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Dec 23, 2023
1 parent fc3617b commit ced1717
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Remarkablemark\Tests\RectorExample;
namespace Remarkablemark\Tests\RectorLaravelDatabaseExpressions;

use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
Expand All @@ -12,7 +12,7 @@
*
* @coversNothing
*/
final class ExampleRectorTest extends AbstractRectorTestCase
final class LaravelDatabaseExpressionsRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideCases
Expand Down
8 changes: 1 addition & 7 deletions tests/fixture/SkipRuleTestFixture.php.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ function select5() {
$db->select('select 5');
}

DB::select(DB::raw('select 6'));

DB::select(
DB::raw('select 7')
);

$db->select(DB::raw('select 8'));
$db->select(DB::raw('select 6'));

$orders = DB::table('orders')
->select('department', DB::raw('SUM(price) as total_sales'))
Expand Down
12 changes: 12 additions & 0 deletions tests/fixture/TestFixture.php.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ declare(strict_types=1);

use Illuminate\Support\Facades\DB;

DB::select(DB::raw('select 1'));

DB::select(
DB::raw('select 2')
);

$orders = DB::table('orders')
->selectRaw(DB::raw('price * ? as price_with_tax'), [1.0825])
->get();
Expand All @@ -18,6 +24,12 @@ declare(strict_types=1);

use Illuminate\Support\Facades\DB;

DB::select(DB::raw('select 1'));

DB::select(
DB::raw('select 2')
);

$orders = DB::table('orders')
->selectRaw(DB::raw('price * ? as price_with_tax')->getValue(DB::getQueryGrammar()), [1.0825])
->get();
Expand Down

0 comments on commit ced1717

Please sign in to comment.