File "FileTest.php"

Full Path: /home/digidjwy/public_html/wp-content/plugins/mycryptocheckout/vendor/plainview/sdk/form2/tests/FileTest.php
File size: 588 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace plainview\sdk_mcc\form2\tests;

/**
	@brief		Test the file input.
	@since		2016-06-21 16:22:57
**/
class FileTest extends TestCase
{
	/**
		@brief		Test the accept handling.
		@since		2016-06-21 16:21:41
	**/
	public function testAccept()
	{
		$form = $this->form();
		$file = $form->file( 'test_file' );

		// Set an accept for all images.
		$accept = 'image/*';
		$file->accept( $accept );
		$this->assertEquals( $accept, $file->get_attribute( 'accept' ) );

		// Clear the accept.
		$file->accept();
		$this->assertEquals( '', $file->get_attribute( 'accept' ) );
	}
}