setBaseEncoder example


  protected $testArray = ['test' => 'test'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->baseEncoder = $this->createMock(BaseXmlEncoder::class);
    $this->encoder = new XmlEncoder();
    $this->encoder->setBaseEncoder($this->baseEncoder);
  }

  /** * Tests the supportsEncoding() method. */
  public function testSupportsEncoding() {
    $this->assertTrue($this->encoder->supportsEncoding('xml'));
    $this->assertFalse($this->encoder->supportsEncoding('json'));
  }

  /** * Tests the supportsDecoding() method. */
Home | Imprint | This part of the site doesn't use cookies.