# # File:: test_PHPProcessor.rb # Author:: wkm # Copyright:: 2009, Zanoccio LLC. # License:: GPL version 2.0 (see LICENSE.rb) # # Unit tests for the PHPProcessor # $:.unshift File.join(File.dirname(__FILE__),'..','lib') require 'test/unit' require 'sitefuel/processors/PHPProcessor' include SiteFuel::Processor class TestPHPProcessor < Test::Unit::TestCase def test_file_extensions assert PHPProcessor.processes_file?('test.php') assert PHPProcessor.processes_file?('test.php5') assert PHPProcessor.processes_file?('test.phtml') end def test_name assert_equal 'PHP', PHPProcessor.processor_name end # test support for PHP documents def test_php assert_equal( "PHP testHello World' ?>

Some filler text.

", PHPProcessor.filter_string(:whitespace, %q{ PHP test Hello World

' ?>

Some filler text.

} ) ) end end