File tree Expand file tree Collapse file tree 3 files changed +23
-54
lines changed Expand file tree Collapse file tree 3 files changed +23
-54
lines changed Original file line number Diff line number Diff line change 2424it ('can search and download music ' , function (array $ songs ): void {
2525 $ mockSequenceMusic = Mockery::mock (SequenceMusic::class);
2626 $ mockSequenceMusic ->allows ('search ' )->andReturn (collect ($ songs ));
27- $ mockSequenceMusic ->allows ('download ' )->andReturnUndefined ( );
27+ $ mockSequenceMusic ->allows ('download ' )->andThrow ( new RuntimeException () );
2828 App \Facades \Music::shouldReceive ('driver ' )->andReturn ($ mockSequenceMusic ->makePartial ());
2929
3030 $ this
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ /**
6+ * This file is part of the guanguans/music-dl.
7+ *
8+ * (c) guanguans <ityaozm@gmail.com>
9+ *
10+ * This source file is subject to the MIT license that is bundled.
11+ */
12+
13+ namespace Tests \Unit \Concerns ;
14+
15+ use App \Concerns \Hydrator ;
16+ use Illuminate \Support \Collection ;
17+
18+ uses (Hydrator::class);
19+
20+ it ('can batch sanitize songs ' , function (array $ songs ): void {
21+ expect ($ this )->hydrates (collect ($ songs ), '腰乐队 ' )->toBeInstanceOf (Collection::class);
22+ })->group (__DIR__ , __FILE__ )->with ('songs ' );
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments