public function testCreateBasketAccessToken() { $manipulator = new TokenManipulator(self::$DI['app']['orm.em'], self::$DI['app']['random.low'], self::$DI['app']['repo.tokens'], self::$DI['app']['tmp.download.path']); $token = $manipulator->createBasketAccessToken(self::$DI['basket_4'], self::$DI['user']); $this->assertSame(self::$DI['basket_4']->getId(), $token->getData()); $this->assertSame(self::$DI['user'], $token->getUser()); $this->assertSame(TokenManipulator::TYPE_VIEW, $token->getType()); $this->assertNull($token->getExpiration()); }