public function test_sanitize_priority() { $this->assertEquals(10, Kirki_Field::sanitize_priority(array())); $this->assertEquals(10, Kirki_Field::sanitize_priority(array('priority' => 'invalid priority'))); $this->assertEquals(20, Kirki_Field::sanitize_priority(array('priority' => '-20'))); $this->assertEquals(20, Kirki_Field::sanitize_priority(array('priority' => -20))); $this->assertEquals(20, Kirki_Field::sanitize_priority(array('priority' => 20))); $this->assertEquals(20, Kirki_Field::sanitize_priority(array('priority' => 20.356))); $this->assertEquals(20, Kirki_Field::sanitize_priority(array('priority' => '20.356'))); }