Ejemplo n.º 1
0
 public function testGetSetHeaderParams()
 {
     $config = new ExportSettings();
     $this->assertFalse($config->isHeaderKeysAsParams());
     $this->assertNull($config->getHeaders());
     $config->setHeaders(['foo', 'bar']);
     $this->assertSame(['foo', 'bar'], $config->getHeaderParams());
     $this->assertSame($config->getHeaders(), $config->getHeaderParams());
     $config->setHeaderKeysAsParams(true);
     $this->assertTrue($config->isHeaderKeysAsParams());
     $this->assertSame([0, 1], $config->getHeaderParams());
     $this->assertSame(['foo', 'bar'], $config->getHeaders());
     $config->setHeaders(['this' => 'is', 'associative' => 'array']);
     $this->assertTrue($config->isHeaderKeysAsParams());
     $this->assertSame(['this', 'associative'], $config->getHeaderParams());
     $this->assertSame(['this' => 'is', 'associative' => 'array'], $config->getHeaders());
 }