public function setUp()
 {
     parent::setUp();
     $this->application = new Application();
     $this->application->add($this->getCommand());
     $this->command = $this->application->find($this->getCommandName());
     $this->command->setContainer($this->getContainer());
     $this->commandTester = new CommandTester($this->command);
 }
 public function setUp()
 {
     parent::setUp();
     $this->prePing = array();
     $this->client = static::createClient(array(), array('PHP_AUTH_USER' => '*****@*****.**', 'PHP_AUTH_PW' => 'supersecret'));
     $journal = $this->references->getReference('journal');
     $this->prePing['contacted'] = $journal->getContacted();
     $this->prePing['status'] = $journal->getstatus();
     $this->prePing['ojsVersion'] = $journal->getOjsVersion();
     $this->prePing['title'] = $journal->getTitle();
 }
 public function setUp()
 {
     parent::setUp();
     $this->sc = $this->getContainer()->get('swordclient');
     $client = new Client();
     $this->history = new History();
     $client->getEmitter()->attach($this->history);
     $mock = new Mock([new Response(200, array('X-Mock' => 'abcpdq'), $this->getResponseBody())]);
     $client->getEmitter()->attach($mock);
     $this->sc->setClient($client);
     $this->sc->serviceDocument($this->references->getReference('journal'));
 }
 public function setUp()
 {
     parent::setUp();
     $this->sc = $this->getContainer()->get('swordclient');
     $client = new Client();
     $this->history = new History();
     $client->getEmitter()->attach($this->history);
     $mock = new Mock([new Response(400, array(), $this->getResponseBody())]);
     $client->getEmitter()->attach($mock);
     $this->sc->setClient($client);
     // do not call serviceDocument() here - it's going throw an exception.
 }
 public function setUp()
 {
     parent::setUp();
     $this->sc = $this->getContainer()->get('swordclient');
     $client = new Client();
     $this->history = new History();
     $client->getEmitter()->attach($this->history);
     $mock = new Mock([$this->getReceiptResponse(), $this->getStatementResponse()]);
     $client->getEmitter()->attach($mock);
     $this->sc->setClient($client);
     $deposit = $this->references->getReference('deposit');
     $deposit->setAuContainer($this->references->getReference('aucontainer'));
     $this->xml = $this->sc->statement($deposit);
 }
 public function setUp()
 {
     parent::setUp();
     $this->sc = $this->getContainer()->get('swordclient');
     $client = new Client();
     $this->history = new History();
     $client->getEmitter()->attach($this->history);
     $mock = new Mock([$this->getServiceDocumentResponse(), $this->getCreateDepositResponse()]);
     $client->getEmitter()->attach($mock);
     $this->sc->setClient($client);
     $deposit = $this->references->getReference('deposit');
     $deposit->setAuContainer($this->references->getReference('aucontainer'));
     //        try {
     $this->sc->createDeposit($deposit);
     //        } catch (Exception $e) {
     //            // expected,  because the response XML isn't valid.
     //        }
 }
Beispiel #7
0
 public function setUp()
 {
     parent::setUp();
     $journal = $this->references->getReference('journal');
     $this->prePing['contacted'] = $journal->getContacted();
     $this->prePing['status'] = $journal->getstatus();
     $this->prePing['ojsVersion'] = $journal->getOjsVersion();
     $this->prePing['title'] = $journal->getTitle();
     $this->prePing['url'] = $journal->getUrl();
     $this->ping = $this->getContainer()->get('ping');
     $client = new Client();
     $this->history = new History();
     $client->getEmitter()->attach($this->history);
     $mock = new Mock([new Response(500, array('Location' => 'http://example.com'))]);
     $client->getEmitter()->attach($mock);
     $this->ping->setClient($client);
     $this->response = $this->ping->ping($journal);
 }
 public function setUp()
 {
     parent::setUp();
     $this->fp = $this->getContainer()->get('filepaths');
     $this->fp->setBaseDir(self::$tmpPath);
 }
 public function setUp()
 {
     parent::setUp();
     $this->client = static::createClient();
     $this->ns = new Namespaces();
 }
 public function setUp()
 {
     parent::setUp();
     $this->repository = $this->em->getRepository('AppBundle:Whitelist');
 }
 public function setUp()
 {
     parent::setUp();
     $this->builder = $this->getContainer()->get('depositbuilder');
 }
 public function setUp()
 {
     parent::setUp();
     $this->client = static::createClient(array(), array('PHP_AUTH_USER' => '*****@*****.**', 'PHP_AUTH_PW' => 'supersecret'));
 }
 public function setUp()
 {
     parent::setUp();
     $this->repository = $this->em->getRepository('AppBundle:AuContainer');
 }
 public function setUp()
 {
     parent::setUp();
     $this->repository = $this->em->getRepository('AppBundle:TermOfUse');
 }
 public function setUp()
 {
     parent::setUp();
     $this->validator = $this->getContainer()->get('dtdvalidator');
     $this->validator->clearErrors();
 }
 public function setUp()
 {
     parent::setUp();
     $this->builder = $this->getContainer()->get('journalbuilder');
 }
 public function setUp()
 {
     parent::setUp();
     // NO AUTH INFO HERE. This is testing anonymous access.
     $this->client = static::createClient();
 }
 public function setUp()
 {
     parent::setUp();
     $this->repository = $this->em->getRepository('AppBundle:Journal');
 }
 public function setUp()
 {
     parent::setUp();
     $this->builder = $this->getContainer()->get('journalbuilder');
     $this->journal = $this->builder->fromXml($this->getDepositXml(), '1B4D7E02-06B9-4791-8762-B6DF064DE1DA');
 }
 public function setUp()
 {
     parent::setUp();
     $this->builder = $this->getContainer()->get('depositbuilder');
     $this->deposit = $this->builder->fromXml($this->references->getReference('journal'), $this->getDepositXml());
 }
 public function setUp()
 {
     parent::setUp();
     $this->list = $this->getContainer()->get('blackwhitelist');
 }
 public function setUp()
 {
     parent::setUp();
     $this->userRepo = $this->em->getRepository('AppUserBundle:User');
 }