Skip to content

Commit

Permalink
Ensure it can add() multiple traits at once
Browse files Browse the repository at this point in the history
  • Loading branch information
ajthinking committed Aug 19, 2022
1 parent d1a4afa commit 92e4de9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Feature/Endpoints/PHP/UseTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@
->add()->useTrait('B')
->assertUseTrait(['B', 'A']); //->assertBeautifulPhp();
});

it('can add multiple class use trait statements', function () {
PHPFile::fromString('class X { use A; }')
->add()->useTrait(['B', 'C'])
->assertUseTrait(['B', 'C', 'A']); //->assertBeautifulPhp();
});

0 comments on commit 92e4de9

Please sign in to comment.