diff --git a/tests/Feature/Initialize/RequestTest.php b/tests/Feature/Initialize/RequestTest.php index daba6b00..e1822918 100644 --- a/tests/Feature/Initialize/RequestTest.php +++ b/tests/Feature/Initialize/RequestTest.php @@ -10,6 +10,7 @@ use App\Setting\NamiSettings; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Queue; +use Phake; use Tests\TestCase; use Zoomyboy\LaravelNami\Authentication\Auth; use Zoomyboy\LaravelNami\Fakes\GroupFake; @@ -97,8 +98,10 @@ class RequestTest extends TestCase public function testItInitializesFromCommandLine(): void { - $this->stubIo(Initializer::class, fn ($mock) => $mock->shouldReceive('run')->once()); + $this->stubIo(Initializer::class, fn ($mock) => $mock); Artisan::call(NamiInitializeCommand::class); + + Phake::verify(app(Initializer::class))->run(); } } diff --git a/tests/Feature/Member/DavTest.php b/tests/Feature/Member/DavTest.php index 35e47829..73cc1b25 100644 --- a/tests/Feature/Member/DavTest.php +++ b/tests/Feature/Member/DavTest.php @@ -85,26 +85,6 @@ VCARD; $this->assertEquals('19930506', $card->BDAY->getValue()); } - public function testItCanSetAndUnsetMobilePhone(): void - { - $member = Member::factory()->defaults()->create(); - - $member->update(['mobile_phone' => '+49 176 555555']); - - $this->assertTrue(count($member->toVcard()->TEL) > 0); - foreach ($member->toVcard()->TEL as $t) { - if (!$t['TYPE'] || 'cell' !== $t['TYPE']->getValue()) { - continue; - } - - $this->assertEquals('+49 176 555555', $t->getValue()); - - return; - } - - $this->assertFalse(true, 'No Phone number found in card'); - } - public function testItUnsetsMobilePhoneNumber(): void { $member = Member::factory()->defaults()->create();