. // }}} namespace App\Test\Controller; use App\Core\DB; use App\Util\GNUsocialTestCase; class NoteTest extends GNUsocialTestCase { public function testNoteView() { $client = static::createClient(); $id = DB::findBy('note', ['neq' => ['content' => null]])[0]->getId(); dd(DB::findBy('note', ['neq' => ['content' => null]])[0]); $crawler = $client->request('GET', '/object/note/{$id}'); $this->assertResponseIsSuccessful(); // $form = $crawler->selectButton('Sign in')->form(); $crawler = $client->submitForm('Sign in', [ '_username' => $nickname, '_password' => $password, ]); $this->assertResponseStatusCodeSame(302); $crawler = $client->followRedirect(); } }