$category->name, 'user_id' => $category->user_id ]; $result = Category::firstOrCreateEncrypted($search); $this->assertEquals($result->id, $category->id); } /** * @covers FireflyIII\Models\Category::firstOrCreateEncrypted */ public function testFirstOrCreateEncryptedNew() { $category = FactoryMuffin::create('FireflyIII\Models\Category'); $search = [ 'name' => 'Some category name', 'user_id' => $category->user_id ]; $result = Category::firstOrCreateEncrypted($search); $this->assertNotEquals($result->id, $category->id); } }