| @@ 1629-1647 (lines=19) @@ | ||
| 1626 | ) |
|
| 1627 | ); |
|
| 1628 | ||
| 1629 | for ( $i = 1; $i <= 2; $i++ ) { |
|
| 1630 | $form = new Grunion_Contact_Form( |
|
| 1631 | array( |
|
| 1632 | 'to' => '"john" <[email protected]>', |
|
| 1633 | 'subject' => 'Hello world! [ ' . wp_rand() . ' ]', |
|
| 1634 | ), |
|
| 1635 | ' |
|
| 1636 | [contact-field label="Name" type="name" required="1"/] |
|
| 1637 | [contact-field label="Email" type="email" required="1"/] |
|
| 1638 | [contact-field label="Dropdown" type="select" options="First option,Second option,Third option"/] |
|
| 1639 | [contact-field label="Radio" type="radio" options="First option,Second option,Third option"/] |
|
| 1640 | [contact-field label="Text" type="text"/] |
|
| 1641 | ' |
|
| 1642 | ); |
|
| 1643 | $this->assertTrue( |
|
| 1644 | is_string( $form->process_submission() ), |
|
| 1645 | 'form submission ' . $i |
|
| 1646 | ); |
|
| 1647 | } |
|
| 1648 | ||
| 1649 | $posts = get_posts( array( 'post_type' => 'feedback' ) ); |
|
| 1650 | $export = $this->plugin->personal_data_exporter( '[email protected]' ); |
|
| @@ 1676-1691 (lines=16) @@ | ||
| 1673 | ) |
|
| 1674 | ); |
|
| 1675 | ||
| 1676 | for ( $i = 1; $i <= 2; $i++ ) { |
|
| 1677 | $form = new Grunion_Contact_Form( |
|
| 1678 | array( |
|
| 1679 | 'to' => '"john" <[email protected]>', |
|
| 1680 | 'subject' => 'Hello world! [ ' . wp_rand() . ' ]', |
|
| 1681 | ), |
|
| 1682 | ' |
|
| 1683 | [contact-field label="Name" type="name" required="1"/] |
|
| 1684 | [contact-field label="Email" type="email" required="1"/] |
|
| 1685 | ' |
|
| 1686 | ); |
|
| 1687 | $this->assertTrue( |
|
| 1688 | is_string( $form->process_submission() ), |
|
| 1689 | 'form submission ' . $i |
|
| 1690 | ); |
|
| 1691 | } |
|
| 1692 | ||
| 1693 | $posts = get_posts( array( 'post_type' => 'feedback' ) ); |
|
| 1694 | $this->assertSame( 2, count( $posts ), 'posts count matches before erasing' ); |
|
| @@ 1713-1728 (lines=16) @@ | ||
| 1710 | ) |
|
| 1711 | ); |
|
| 1712 | ||
| 1713 | for ( $i = 1; $i <= 3; $i++ ) { |
|
| 1714 | $form = new Grunion_Contact_Form( |
|
| 1715 | array( |
|
| 1716 | 'to' => '"jane" <[email protected]>', |
|
| 1717 | 'subject' => 'Hello world! [ ' . wp_rand() . ' ]', |
|
| 1718 | ), |
|
| 1719 | ' |
|
| 1720 | [contact-field label="Name" type="name" required="1"/] |
|
| 1721 | [contact-field label="Email" type="email" required="1"/] |
|
| 1722 | ' |
|
| 1723 | ); |
|
| 1724 | $this->assertTrue( |
|
| 1725 | is_string( $form->process_submission() ), |
|
| 1726 | 'form submission ' . $i |
|
| 1727 | ); |
|
| 1728 | } |
|
| 1729 | ||
| 1730 | $this->add_field_values( |
|
| 1731 | array( |
|